package saxion.speelveld.spaceengineer.buildings;

import saxion.speelveld.spaceengineer.R;
import saxion.speelveld.spaceengineer.model.ProducingBuilding;
import saxion.speelveld.spaceengineer.model.Resource;
import saxion.speelveld.spaceengineer.model.ResourceType;

public class Factory extends ProducingBuilding
{

	public Factory()
	{
		super(3, 2);
		super.setBuildingName(Factory.this.getClass().getSimpleName());
		super.setBuildingExplanation("The Factory produces differenct kind of goods from your " +
			"harvested resources like furniture.");
		super.resourceCosts.add(new Resource(ResourceType.MONEY, 500));
		super.resourceCosts.add(new Resource(ResourceType.ELECTRICITY, 20));
		super.resourceCosts.add(new Resource(ResourceType.WATER, 100));
		super.resourceCosts.add(new Resource(ResourceType.GLASS, 100));
		super.resourceCosts.add(new Resource(ResourceType.METAL, 200));
		super.resourceCosts.add(new Resource(ResourceType.HAPPINESS, 1));

		super.addPossibleResourceProducement(new Resource(ResourceType.FURNITURE, 2, true), new Resource(
			ResourceType.WOOD, 4, true));
		super.addPossibleResourceProducement(new Resource(ResourceType.CLOTHING, 2, true), new Resource(
			ResourceType.COTTON, 4, true));
		super.addPossibleResourceProducement(new Resource(ResourceType.JEWELRY, 2, true), new Resource(
			ResourceType.GOLD, 4, true));

		// Mitchell's gedachte :)
		/**
		 * super.setResourcesProduced(ResourceType.FURNITURE); super.setResourcesProduced(ResourceType.HAPPINESS);
		 * 
		 * if (super.getResourcesProduced() == ResourceType.FURNITURE) { super.setProductioncapacity(1); } if
		 * (super.getResourcesProduced() == ResourceType.HAPPINESS) { super.setProductioncapacity(1); }
		 */

		super.resourceImages = new int[6];
		super.resourceImages[0] = R.drawable.factory_0;
		super.resourceImages[1] = R.drawable.factory_1;
		super.resourceImages[2] = R.drawable.factory_2;
		super.resourceImages[3] = R.drawable.factory_3;
		super.resourceImages[4] = R.drawable.factory_4;
		super.resourceImages[5] = R.drawable.factory_5;
		super.setPreviewResourceImageId(R.drawable.factory);

	}

	// @Override
	// public int produceGoods()
	// {
	// return 0;
	// }

}
